package continuity;

/**
 * Zetor csapat szekelton
 * 
 * A program célja hogy a modellről eldönthető legyen, hogy a feladat egy helyes
 * megoldását nyújtja.
 * 
 * @author Balogh Peter Tamas
 * @author Gál István László
 * @author Kárász Gábor
 * @author Simon Endre András
 * @author Szabó Alex
 */
public class SpriteFactory {

    private Game game;
    private Character character;
    /**
     * 
     */
    final static public String className = "SpriteFactory";
    /**
     * 
     */
    public String name;

    /**
     * 
     * @param type
     * @return
     */
    public Sprite createSprite(int type, Object[] params) {
        String classInfo = name + "(" + className + ")::createSprite(): sprite";
        if(type == 1) {
            return new Character((Point3d)params[0], game, (String)params[1]);
        } else if(type == 2) {
            return new Door((Point3d)params[0], character, (String)params[1]);
        } else if(type == 3) {
            return new Key((Point3d)params[0], character, (String)params[1]);
        } else {
            return new Wall((Point3d)params[0], (Integer)params[1], 
                    (Integer)params[2], (String)params[3]);
        }
    }

    /**
     * 
     * @param g
     */
    public void setGame(Game g) {
        String classInfo = name + "(" + className + ")::setGame(): void";

    }

    /**
     * 
     * @param c
     */
    public void setChar(Character c) {
        String classInfo = name + "(" + className + ")::setChar(): void";
    }
    
    public SpriteFactory(Game g, Character c, String n) {
        game = g;
        character = c;
        name = n;
    }
}
